<template>
	<div class="box">
		<div class="null-page" v-show="yes"></div>
		
		<el-card class="box-card">
			<div slot="header" class="clearfix">
				<el-breadcrumb separator="/">
					<el-breadcrumb-item :to="{ path: '/member/withdrawal' }"> {{ $t('member.withdrawal_detail.rcord') }}</el-breadcrumb-item>
					<el-breadcrumb-item> {{ $t('member.withdrawal_detail.details') }}</el-breadcrumb-item>
				</el-breadcrumb>
			</div>
		
			<div v-loading="loading">
				<div class="money-wrap">
					<span>-{{ detail.apply_money }}</span>
				</div>
				<div class="line-wrap">
					<span class="label"> {{ $t('member.withdrawal_detail.currentState') }}</span>
					<span class="value">{{ detail.status_name }}</span>
				</div>
				<div class="line-wrap">
					<span class="label"> {{ $t('member.withdrawal_detail.transactionNumber') }}</span>
					<span class="value">{{ detail.withdraw_no }}</span>
				</div>
				<div class="line-wrap">
					<span class="label"> {{ $t('member.withdrawal_detail.handlingFee') }}</span>
					<span class="value">{{ detail.service_money }}  {{ $t('member.withdrawal_detail.symbol') }}</span>
				</div>
				<div class="line-wrap">
					<span class="label"> {{ $t('member.withdrawal_detail.applicationTime') }}</span>
					<span class="value">{{ $util.timeStampTurnTime(detail.apply_time) }}</span>
				</div>
				<div class="line-wrap" v-if="detail.status">
					<span class="label"> {{ $t('member.withdrawal_detail.reviewTime') }}</span>
					<span class="value">{{ $util.timeStampTurnTime(detail.audit_time) }}</span>
				</div>
				<div class="line-wrap" v-if="detail.bank_name">
					<span class="label"> {{ $t('member.withdrawal_detail.bankName') }}</span>
					<span class="value">{{ detail.bank_name }}</span>
				</div>
				<div class="line-wrap">
					<span class="label"> {{ $t('member.withdrawal_detail.receivingAccount') }}</span>
					<span class="value">{{ detail.account_number }}</span>
				</div>
				<div class="line-wrap" v-if="detail.status == -1 && detail.refuse_reason">
					<span class="label"> {{ $t('member.withdrawal_detail.reasonForRejection') }}</span>
					<span class="value">{{ detail.refuse_reason }}</span>
				</div>
				<div class="line-wrap" v-if="detail.status == 2">
					<span class="label"> {{ $t('member.withdrawal_detail.nameOfTransferMethod') }}</span>
					<span class="value">{{ detail.transfer_type_name }}</span>
				</div>
				<div class="line-wrap" v-if="detail.status == 2">
					<span class="label"> {{ $t('member.withdrawal_detail.transferTime') }}</span>
					<span class="value">{{ $util.timeStampTurnTime(detail.payment_time) }}</span>
				</div>
			</div>
		</el-card>
	</div>
</template>

<script>
import { withdrawDetail } from "@/api/member/account"

export default {
	name: 'withdrawal_detail',
	components: {},
	data: () => {
		return {
			loading: true,
			id: '',
			detail: {},
			yes: true
		};
	},
	created() {
		this.getDetail();
	},
	mounted() {
		let self = this;
		setTimeout(function() {
			self.yes = false
		}, 300)
	},
	methods: {
		//获得提现详情
		getDetail() {
			this.id = this.$route.query.id
			
			withdrawDetail({
				id: this.id
			}).then(res => {
				if (res.data) {
					this.detail = res.data;
				}
				this.loading = false
			}).catch(err => {
				this.loading = false
			})
		}
	}
};
</script>

<style lang="scss" scoped>
	.box {
		width: 100%;
		position: relative;
	}
	
	.null-page {
		width: 100%;
		height: 730px;
		background-color: #FFFFFF;
		position: absolute;
		top: 0;
		left: 0;
		z-index: 9;
	}
	
	.el-card.is-always-shadow,
	.el-card.is-hover-shadow:focus,
	.el-card.is-hover-shadow:hover {
	    box-shadow: unset;
	}
	
	.el-card {
	    border: 0;
	}
	
	.money-wrap {
		font-size: 20px;
		font-weight: 600;
	}
	
	.line-wrap {
		margin-top: 20px;
		
		.label {
			display: inline-block;
			width: 100px;
			color: #898989;
		}
	}
</style>
